package InheritanceDemo4;

public class Staff extends Person {
    private double salary;

    public Staff(String id, String name, String gender, double salary) {
        super(id, name, gender);
        this.salary = salary;
    }

    public double getSalary() { return salary; }

    @Override
    public void showBasicInfo() {
        super.showBasicInfo();
        System.out.println("工资：" + salary + "元");
    }
}